#pragma once
#include <string>
#include <exception>
#include "UIModuleDef.h"

typedef enum {
	LOGGER_LOG4CXX
} UILoggerType;


#define DEFAULT_LOGGER LOGGER_LOG4CXX
#define DEFAULT_LOGGER_CONFIG "..\\Resources\\Logging\\logging-log4cxx.config"

class UILogger
{
public:
	static UILogger* getInstance();
	static void create(UILoggerType type, std::string configFilePath);
	static void release();

	inline std::string getLogPath()				{	return m_logPath;		 }
	inline std::string getLogFilePrefix()		{	return m_logFilePrefix;	 }
	inline std::string getSpeechLogPath()		{	return m_speechLogPath;	 }
	inline std::string getTTSLogPath()			{	return m_ttsLogPath;	 }

	/** Overloaded method for initializing Logging Mechanism */
	virtual void initLogger(std::string configFile) {};
	
	/** Disable Logging Mechanism */ 
	virtual void disable(){};

	/** Overloaded FATAL Logging mode with reference calling object name*/
	virtual void fatal(UIModuleType moduleType, std::string className, std::string message) {};

	/** Overloaded WARN Logging mode with reference calling object name*/
	virtual void warn(UIModuleType moduleType, std::string className, std::string message) {};

	/** Overloaded INF Logging mode with reference calling object name*/
	virtual void inf(UIModuleType moduleType, std::string className, std::string message) {};

	/** Overloaded ERR Logging mode with reference calling object name*/
	virtual void err(UIModuleType moduleType, std::string className, std::string message) {};

	/** Overloaded DEBUG Logging mode with reference calling object name*/
	virtual void debug(UIModuleType moduleType, std::string className, std::string message) {};

protected:
	UILogger(void);
	virtual ~UILogger(void);
	static UILogger* m_pInstance;

private:
	void setLogPath(void);
	
	char m_logPath[4096];
	char m_logFilePrefix[4096];
	char m_speechLogPath[4096];
	char m_ttsLogPath[4096];
};

